home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
WINDOWS
/
MDIT.ARJ
/
MDIT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1992-03-31
|
4KB
|
122 lines
/****************************************************************************
Module name: MDIT.H
Programmer : Jeffrey M. Richter & Elvira Peretsman.
Modified : V.M. Vanderburg - For PCThreads demo.
*****************************************************************************/
#include "dialog.h"
#include "pcthread.h"
extern char g_szAppName[];
extern HANDLE g_hInstance;
extern HANDLE g_hAccelTable;
extern HWND g_hWndMDITClient;
BOOL FAR PASCAL RegisterFrameWndClass (void);
BOOL FAR PASCAL RegisterThreadWndClass (void);
#define GETFRAME(hWnd) ((HWND) (GetParent(GetParent(hWnd))))
typedef struct th_list
{
struct th_list *next_p;
pcthread_t th;
} th_list_t, *th_list_p_t;
#define FW_MDITCHILDDESTROY (WM_USER + 0)
#define FW_RESIZEMDITCLIENT (WM_USER + 1)
#define FW_GETSTATBARRECT (WM_USER + 2)
#define FW_SETMENUHELP (WM_USER + 3)
#define FW_GETMENUHELP (WM_USER + 4)
#define FW_DRAWSTATUSDIVIDE (WM_USER + 5)
#define AW_PAINTMENUHELP (WM_USER + 100)
#define AC_PAINTSTATBAR (WM_USER + 200)
#define IDM_FILEOPENTHREAD 101
#define IDM_EXIT 102
#define IDM_OPTIONSSTATUS 140
#define IDM_HELPINDEX 150
#define IDM_HELPKEYBOARD 151
#define IDM_HELPCOMMANDS 152
#define IDM_HELPPROCEDURES 153
#define IDM_HELPUSINGHELP 154
#define IDM_ABOUT 155
#define IDM_WINDOWTILEVERT 160
#define IDM_WINDOWTILEHORIZ 161
#define IDM_WINDOWCASCADE 162
#define IDM_WINDOWARRANGEICONS 163
#define IDM_WINDOWCHILD 164
//*********************** String Table Constants *****************************
#define IDS_FRAMEPOPUPID 1000
#define IDS_FRAMEMENUID 2000
#define IDS_THREADPOPUPID 3000
#define IDS_THREADMENUID 4000
#define IDS_FRAMESTATUSBAR 7000
#define IDS_THREADSTATUSBAR 7001
#define IDM_SYSMENUSIZE 0x00 // ((SC_SIZE & 0x0FFF) >> 4)
#define IDM_SYSMENUMOVE 0x01 // ((SC_MOVE & 0x0FFF) >> 4)
#define IDM_SYSMENUMINIMIZE 0x02 // ((SC_MINIMIZE & 0x0FFF) >> 4)
#define IDM_SYSMENUMAXIMIZE 0x03 // ((SC_MAXIMIZE & 0x0FFF) >> 4)
#define IDM_SYSMENUNEXTWINDOW 0x04 // ((SC_NEXTWINDOW & 0x0FFF) >> 4)
#define IDM_SYSMENUCLOSE 0x06 // ((SC_CLOSE & 0x0FFF) >> 4)
#define IDM_SYSMENURESTORE 0x12 // ((SC_RESTORE & 0x0FFF) >> 4)
#define IDM_SYSMENUTASKLIST 0x13 // ((SC_TASKLIST & 0x0FFF) >> 4)
void FAR PASCAL ChangeMDITMenu (HWND hWndFrame, HWND hWndClient,
HMENU hTopLevelMenu, WORD wMenuID);
HWND FAR PASCAL CreateMDITChild (LPSTR szClassName, LPSTR szWindowName,
DWORD dwStyle, short x, short y, short nWidth, short nHeight,
HWND hWndMDITClient, HANDLE hInstance, LONG lParam);
//*********** Macros for use by Window and Class Extra Bytes *****************
#define offsetof(Struct, Member) \
((unsigned int) &(((Struct NEAR *) 0)->Member))
#define GETWNDEB(hWnd, Struct, Member) \
((sizeof(((Struct FAR *)0)->Member) == sizeof(DWORD)) ? \
GetWindowLong(hWnd, offsetof(Struct, Member)) : \
GetWindowWord(hWnd, offsetof(Struct, Member)))
#define SETWNDEB(hWnd, Struct, Member, Value) \
((sizeof(((Struct FAR *)0)->Member) == sizeof(DWORD)) ? \
SetWindowLong(hWnd, offsetof(Struct, Member), Value) : \
SetWindowWord(hWnd, offsetof(Struct, Member), (WORD) Value))
#define GETCLSEB(hWnd, Struct, Member) \
((sizeof(((Struct FAR *)0)->Member) == sizeof(DWORD)) ? \
GetClassLong(hWnd, offsetof(Struct, Member)) : \
GetClassWord(hWnd, offsetof(Struct, Member)))
#define SETCLSEB(hWnd, Struct, Member, Value) \
((sizeof(((Struct FAR *)0)->Member) == sizeof(DWORD)) ? \
SetClassLong(hWnd, offsetof(Struct, Member), Value) : \
SetClassWord(hWnd, offsetof(Struct, Member), (WORD) Value))